Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

mark TransactionFut as Send #723

Merged
merged 2 commits into from
Dec 23, 2021

Conversation

georgewhewell
Copy link
Contributor

Motivation

transactions_unordered() is not Send

Solution

mark TransactionFut as Send

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lg, but this won't work in wasm.
here's an existing workaround for that

#[cfg(target_arch = "wasm32")]
type WatcherFuture<'a> = Pin<Box<dyn futures_util::stream::Stream<Item = ()> + 'a>>;
#[cfg(not(target_arch = "wasm32"))]
type WatcherFuture<'a> = Pin<Box<dyn futures_util::stream::Stream<Item = ()> + Send + 'a>>;

Copy link
Owner

@gakonst gakonst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great! if you're building on ethers and not already in the chatroom / want to talk more about what you're doing: https://t.me/ethers_rs

@gakonst gakonst merged commit bb0cd7a into gakonst:master Dec 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants